import request from "./request";
import qs from "qs";
//请求首页的数据
export const getHomeDataAPI = () => request.get("/index/index");
//用户登录接口
export const userLoginAPI = (data) =>
  request.post("/auth/loginByWeb", {
    username: data.username,
    pwd: data.password,
  });
//搜索页面数据
export const getSearchDataAPI = () => request.get("/search/index");
//实时搜索
export const realTimeSearchAPI = (params) =>
  request.get("/search/helper", { params: params });
//搜索商品列表
export const getGoodsListAPI = (params) =>
  request.get("/goods/list", { params: params });
//清除历史搜索
export const cleanHistoryAPI = () => request.post("/search/clearhistory");
//获取商品详细信息
export const getGoodsDetailAPI = (goodsID) => request.get("/goods/detail",{params:{
  id:goodsID

}});
